package org.grapes.wine.api.server.model.dao;

import org.grapes.wine.api.server.model.DAOName;
import org.grapes.wine.api.server.model.IDAO;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

@Indexed
public class LandscapeDAO implements IDAO {
	@DocumentId
	private String id;
	private int version;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private int serial;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private String landscapeName;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private String introduction;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private int price;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private String sightName;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private int visitPeriod;

	public LandscapeDAO() {
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public int getVersion() {
		return version;
	}

	public void setSerial(int serial) {
		this.serial = serial;
	}

	public int getSerial() {
		return serial;
	}

	public String getLandscapeName() {
		return landscapeName;
	}

	public void setLandscapeName(String landscapeName) {
		this.landscapeName = landscapeName;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public String getSightName() {
		return sightName;
	}

	public void setSightName(String sightName) {
		this.sightName = sightName;
	}

	public int getVisitPeriod() {
		return visitPeriod;
	}

	public void setVisitPeriod(int visitPeriod) {
		this.visitPeriod = visitPeriod;
	}

	public DAOName getDAOName() {
		return DAOName.Landscape;
	}

	public String[] paramName() {
		return new String[] { "serial", "landscapeName", "introduction",
				"price", "sightName", "visitPeriod" };
	}
}
